﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using DataContextLayer;

namespace BlueHarvestSnippetGenerator.Pages
{
    /// <summary>
    /// Interaction logic for UserProfile.xaml
    /// </summary>
    public partial class UserProfilePage : Page
    {
        
        public UserProfilePage()
        {
            InitializeComponent();
         
            ShowsNavigationUI = false;

            Loaded += UserProfileLoaded;//sets loading functions

        }
        private void UserProfileLoaded(object sender, RoutedEventArgs e)
        {
            //listBox1.ItemsSource = UserProfile.GetRecentTutorials();
            


            if (NavigationService != null && NavigationService.CanGoBack)
            {
                NavigationService.RemoveBackEntry(); //stops back button
                
            }
        }
        private void BtnSnippetsClick(object sender, RoutedEventArgs e)
        {
            NavigationService.PageNav(PageName.SnippetChoice);
        }

		private void BtnTutorialsClick(object sender, RoutedEventArgs e)
		{
            NavigationService.PageNav(PageName.TutorialChoice);
		}
        
    }
}
